package com.colorlight.cloud.gateway.api.exception.enums;

import com.colorlight.cloud.common.model.enums.api.ExceptionInterface;
import lombok.Getter;

/**
 * @author Demon
 * 业务异常定义
 */
@Getter
public enum ReflexExceptionEnum implements ExceptionInterface<ReflexExceptionEnum> {
	//待补充
	REFLEX_DEFAULT_EXCEPTION(3000,"反射默认异常"),
	PROTO_TO_OBJECT_BUILD_OBJECT_EXCEPT(3001,"proto to Object 根据属性值与类型构建对象异常"),
	//异常类型 :
	PROTO_TO_OBJECT_GET_METHOD_EXCEPT(3001,"proto to Object 获取方法失败"),
	;
	/**
	 * 编码
	 */
	private final Integer code;
	
	/**
	 * 异常信息描述
	 */
	private final String description;
	
	
	ReflexExceptionEnum(Integer code, String description) {
		this.code = code;
		this.description = description;
	}
	
	@Override
	public Integer getCode() {
		return code;
	}
	
	@Override
	public ReflexExceptionEnum getT() {
		return this;
	}
	
	@Override
	public String getThisDescription() {
		return this.getDescription();
	}
}
